/**
 *  iBizSys 5.0 机器人生产代码（不要直接修改当前代码）
 *  http://www.ibizsys.net
 */
package com.sa.ibiz.demo.srv.demo.entity;


import java.io.Serializable;
import java.util.HashMap;
import java.util.ArrayList;

import javax.persistence.Column;

import java.sql.Timestamp;
import net.ibizsys.paas.data.IDataObject;
import net.ibizsys.paas.data.DataObject;
import net.ibizsys.paas.util.StringHelper;
import net.sf.json.JSONObject;
import net.ibizsys.paas.util.JSONObjectHelper;
import net.ibizsys.paas.xml.XmlNode;
import net.ibizsys.paas.service.ServiceGlobal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


/**
 * 实体[IBZ5ACCOUNT] 数据对象
 */
public class IBZ5ACCOUNT extends net.ibizsys.paas.entity.EntityBase implements Serializable {

    private static final long serialVersionUID = -1L;
    private static final Log log = LogFactory.getLog(IBZ5ACCOUNT.class);
    /**
     *   实体属性标识[开户银行号]
     */
    public final static String FIELD_BANKACCOUNTNUM = "BANKACCOUNTNUM";
    /**
     *   实体属性标识[开户行]
     */
    public final static String FIELD_BANKNAME = "BANKNAME";
    /**
     *   实体属性标识[建立时间]
     */
    public final static String FIELD_CREATEDATE = "CREATEDATE";
    /**
     *   实体属性标识[建立人]
     */
    public final static String FIELD_CREATEMAN = "CREATEMAN";
    /**
     *   实体属性标识[账户标识]
     */
    public final static String FIELD_IBZ5ACCOUNTID = "IBZ5ACCOUNTID";
    /**
     *   实体属性标识[账户名称]
     */
    public final static String FIELD_IBZ5ACCOUNTNAME = "IBZ5ACCOUNTNAME";
    /**
     *   实体属性标识[更新时间]
     */
    public final static String FIELD_UPDATEDATE = "UPDATEDATE";
    /**
     *   实体属性标识[更新人]
     */
    public final static String FIELD_UPDATEMAN = "UPDATEMAN";

    private final static int INDEX_BANKACCOUNTNUM = 0;
    private final static int INDEX_BANKNAME = 1;
    private final static int INDEX_CREATEDATE = 2;
    private final static int INDEX_CREATEMAN = 3;
    private final static int INDEX_IBZ5ACCOUNTID = 4;
    private final static int INDEX_IBZ5ACCOUNTNAME = 5;
    private final static int INDEX_UPDATEDATE = 6;
    private final static int INDEX_UPDATEMAN = 7;

    private final static HashMap<String, Integer> fieldIndexMap = new HashMap<String, Integer>();
    static {
        fieldIndexMap.put( FIELD_BANKACCOUNTNUM, INDEX_BANKACCOUNTNUM);
        fieldIndexMap.put( FIELD_BANKNAME, INDEX_BANKNAME);
        fieldIndexMap.put( FIELD_CREATEDATE, INDEX_CREATEDATE);
        fieldIndexMap.put( FIELD_CREATEMAN, INDEX_CREATEMAN);
        fieldIndexMap.put( FIELD_IBZ5ACCOUNTID, INDEX_IBZ5ACCOUNTID);
        fieldIndexMap.put( FIELD_IBZ5ACCOUNTNAME, INDEX_IBZ5ACCOUNTNAME);
        fieldIndexMap.put( FIELD_UPDATEDATE, INDEX_UPDATEDATE);
        fieldIndexMap.put( FIELD_UPDATEMAN, INDEX_UPDATEMAN);
    }

    private IBZ5ACCOUNT proxyIBZ5ACCOUNT = null;

    public IBZ5ACCOUNT() {
        super();
    }
    private boolean bankaccountnumDirtyFlag = false;
    private boolean banknameDirtyFlag = false;
    private boolean createdateDirtyFlag = false;
    private boolean createmanDirtyFlag = false;
    private boolean ibz5accountidDirtyFlag = false;
    private boolean ibz5accountnameDirtyFlag = false;
    private boolean updatedateDirtyFlag = false;
    private boolean updatemanDirtyFlag = false;

    @Column(name="bankaccountnum")
    private String bankaccountnum;
    @Column(name="bankname")
    private String bankname;
    @Column(name="createdate")
    private Timestamp createdate;
    @Column(name="createman")
    private String createman;
    @Column(name="ibz5accountid")
    private String ibz5accountid;
    @Column(name="ibz5accountname")
    private String ibz5accountname;
    @Column(name="updatedate")
    private Timestamp updatedate;
    @Column(name="updateman")
    private String updateman;


    /**
     *  设置属性值[开户银行号]
     *  @param bankaccountnum
     */
    public void setBANKACCOUNTNUM(String bankaccountnum) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setBANKACCOUNTNUM(bankaccountnum);
            return;
        }
        if(bankaccountnum!=null) {
            bankaccountnum = StringHelper.trimRight(bankaccountnum);
            if(bankaccountnum.length()==0) {
                bankaccountnum = null;
            }
        }
        this.bankaccountnum =  bankaccountnum;
        this.bankaccountnumDirtyFlag  = true;
    }

    /**
     *  获取属性值[开户银行号]
     */
    public String getBANKACCOUNTNUM() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getBANKACCOUNTNUM();
        }
        return this.bankaccountnum;
    }

    /**
     *  获取属性值[开户银行号]是否修改
     */
    public boolean isBANKACCOUNTNUMDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isBANKACCOUNTNUMDirty();
        }
        return this.bankaccountnumDirtyFlag;
    }

    /**
     *  重置属性值[开户银行号]
     */
    public void resetBANKACCOUNTNUM() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetBANKACCOUNTNUM();
            return;
        }

        this.bankaccountnumDirtyFlag = false;
        this.bankaccountnum = null;
    }
    /**
     *  设置属性值[开户行]
     *  @param bankname
     */
    public void setBANKNAME(String bankname) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setBANKNAME(bankname);
            return;
        }
        if(bankname!=null) {
            bankname = StringHelper.trimRight(bankname);
            if(bankname.length()==0) {
                bankname = null;
            }
        }
        this.bankname =  bankname;
        this.banknameDirtyFlag  = true;
    }

    /**
     *  获取属性值[开户行]
     */
    public String getBANKNAME() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getBANKNAME();
        }
        return this.bankname;
    }

    /**
     *  获取属性值[开户行]是否修改
     */
    public boolean isBANKNAMEDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isBANKNAMEDirty();
        }
        return this.banknameDirtyFlag;
    }

    /**
     *  重置属性值[开户行]
     */
    public void resetBANKNAME() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetBANKNAME();
            return;
        }

        this.banknameDirtyFlag = false;
        this.bankname = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreateDate(Timestamp createdate) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setCreateDate(createdate);
            return;
        }
        this.createdate =  createdate;
        this.createdateDirtyFlag  = true;
    }

    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreateDate() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getCreateDate();
        }
        return this.createdate;
    }

    /**
     *  获取属性值[建立时间]是否修改
     */
    public boolean isCreateDateDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isCreateDateDirty();
        }
        return this.createdateDirtyFlag;
    }

    /**
     *  重置属性值[建立时间]
     */
    public void resetCreateDate() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetCreateDate();
            return;
        }

        this.createdateDirtyFlag = false;
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     *  @param createman
     */
    public void setCreateMan(String createman) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setCreateMan(createman);
            return;
        }
        if(createman!=null) {
            createman = StringHelper.trimRight(createman);
            if(createman.length()==0) {
                createman = null;
            }
        }
        this.createman =  createman;
        this.createmanDirtyFlag  = true;
    }

    /**
     *  获取属性值[建立人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     */
    public String getCreateMan() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getCreateMan();
        }
        return this.createman;
    }

    /**
     *  获取属性值[建立人]是否修改
     */
    public boolean isCreateManDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isCreateManDirty();
        }
        return this.createmanDirtyFlag;
    }

    /**
     *  重置属性值[建立人]
     */
    public void resetCreateMan() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetCreateMan();
            return;
        }

        this.createmanDirtyFlag = false;
        this.createman = null;
    }
    /**
     *  设置属性值[账户标识]
     *  @param ibz5accountid
     */
    public void setIBZ5ACCOUNTId(String ibz5accountid) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setIBZ5ACCOUNTId(ibz5accountid);
            return;
        }
        if(ibz5accountid!=null) {
            ibz5accountid = StringHelper.trimRight(ibz5accountid);
            if(ibz5accountid.length()==0) {
                ibz5accountid = null;
            }
        }
        this.ibz5accountid =  ibz5accountid;
        this.ibz5accountidDirtyFlag  = true;
    }

    /**
     *  获取属性值[账户标识]
     */
    public String getIBZ5ACCOUNTId() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getIBZ5ACCOUNTId();
        }
        return this.ibz5accountid;
    }

    /**
     *  获取属性值[账户标识]是否修改
     */
    public boolean isIBZ5ACCOUNTIdDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isIBZ5ACCOUNTIdDirty();
        }
        return this.ibz5accountidDirtyFlag;
    }

    /**
     *  重置属性值[账户标识]
     */
    public void resetIBZ5ACCOUNTId() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetIBZ5ACCOUNTId();
            return;
        }

        this.ibz5accountidDirtyFlag = false;
        this.ibz5accountid = null;
    }
    /**
     *  设置属性值[账户名称]
     *  @param ibz5accountname
     */
    public void setIBZ5ACCOUNTName(String ibz5accountname) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setIBZ5ACCOUNTName(ibz5accountname);
            return;
        }
        if(ibz5accountname!=null) {
            ibz5accountname = StringHelper.trimRight(ibz5accountname);
            if(ibz5accountname.length()==0) {
                ibz5accountname = null;
            }
        }
        this.ibz5accountname =  ibz5accountname;
        this.ibz5accountnameDirtyFlag  = true;
    }

    /**
     *  获取属性值[账户名称]
     */
    public String getIBZ5ACCOUNTName() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getIBZ5ACCOUNTName();
        }
        return this.ibz5accountname;
    }

    /**
     *  获取属性值[账户名称]是否修改
     */
    public boolean isIBZ5ACCOUNTNameDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isIBZ5ACCOUNTNameDirty();
        }
        return this.ibz5accountnameDirtyFlag;
    }

    /**
     *  重置属性值[账户名称]
     */
    public void resetIBZ5ACCOUNTName() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetIBZ5ACCOUNTName();
            return;
        }

        this.ibz5accountnameDirtyFlag = false;
        this.ibz5accountname = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdateDate(Timestamp updatedate) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setUpdateDate(updatedate);
            return;
        }
        this.updatedate =  updatedate;
        this.updatedateDirtyFlag  = true;
    }

    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdateDate() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getUpdateDate();
        }
        return this.updatedate;
    }

    /**
     *  获取属性值[更新时间]是否修改
     */
    public boolean isUpdateDateDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isUpdateDateDirty();
        }
        return this.updatedateDirtyFlag;
    }

    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdateDate() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetUpdateDate();
            return;
        }

        this.updatedateDirtyFlag = false;
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     *  @param updateman
     */
    public void setUpdateMan(String updateman) {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().setUpdateMan(updateman);
            return;
        }
        if(updateman!=null) {
            updateman = StringHelper.trimRight(updateman);
            if(updateman.length()==0) {
                updateman = null;
            }
        }
        this.updateman =  updateman;
        this.updatemanDirtyFlag  = true;
    }

    /**
     *  获取属性值[更新人]代码表：com.sa.ibiz.demo.srv.codelist.SysOperatorCodeListModel
     */
    public String getUpdateMan() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getUpdateMan();
        }
        return this.updateman;
    }

    /**
     *  获取属性值[更新人]是否修改
     */
    public boolean isUpdateManDirty() {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isUpdateManDirty();
        }
        return this.updatemanDirtyFlag;
    }

    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateMan() {

        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().resetUpdateMan();
            return;
        }

        this.updatemanDirtyFlag = false;
        this.updateman = null;
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.entity.EntityBase#onReset()
     */
    @Override
    protected void onReset() {
        IBZ5ACCOUNT.resetAll(this);
        super.onReset();
    }

    /**
     * 重置当前数据对象属性值
     * @param entity
     */
    private static void resetAll(IBZ5ACCOUNT et) {
        et.resetBANKACCOUNTNUM();
        et.resetBANKNAME();
        et.resetCreateDate();
        et.resetCreateMan();
        et.resetIBZ5ACCOUNTId();
        et.resetIBZ5ACCOUNTName();
        et.resetUpdateDate();
        et.resetUpdateMan();
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.entity.EntityBase#onFillMap(java.util.HashMap, boolean)
     */
    @Override
    protected void onFillMap(HashMap<String, Object> params, boolean bDirtyOnly) {
        if(!bDirtyOnly || isBANKACCOUNTNUMDirty()) {
            params.put(FIELD_BANKACCOUNTNUM,getBANKACCOUNTNUM());
        }
        if(!bDirtyOnly || isBANKNAMEDirty()) {
            params.put(FIELD_BANKNAME,getBANKNAME());
        }
        if(!bDirtyOnly || isCreateDateDirty()) {
            params.put(FIELD_CREATEDATE,getCreateDate());
        }
        if(!bDirtyOnly || isCreateManDirty()) {
            params.put(FIELD_CREATEMAN,getCreateMan());
        }
        if(!bDirtyOnly || isIBZ5ACCOUNTIdDirty()) {
            params.put(FIELD_IBZ5ACCOUNTID,getIBZ5ACCOUNTId());
        }
        if(!bDirtyOnly || isIBZ5ACCOUNTNameDirty()) {
            params.put(FIELD_IBZ5ACCOUNTNAME,getIBZ5ACCOUNTName());
        }
        if(!bDirtyOnly || isUpdateDateDirty()) {
            params.put(FIELD_UPDATEDATE,getUpdateDate());
        }
        if(!bDirtyOnly || isUpdateManDirty()) {
            params.put(FIELD_UPDATEMAN,getUpdateMan());
        }
        super.onFillMap(params, bDirtyOnly);
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#get(java.lang.String)
     */
    @Override
    public Object get(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().get(strParamName);
        }

        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");
        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.get(strParamName);

        return  IBZ5ACCOUNT.get(this, index);
    }

    /**
     * 通过属性标识获取属性值
     * @param et 数据对象
     * @param index 属性标识
     * @return
     * @throws Exception
     */
    private static Object get(IBZ5ACCOUNT et,int index) throws Exception {

        switch(index) {
        case INDEX_BANKACCOUNTNUM:
            return et.getBANKACCOUNTNUM();
        case INDEX_BANKNAME:
            return et.getBANKNAME();
        case INDEX_CREATEDATE:
            return et.getCreateDate();
        case INDEX_CREATEMAN:
            return et.getCreateMan();
        case INDEX_IBZ5ACCOUNTID:
            return et.getIBZ5ACCOUNTId();
        case INDEX_IBZ5ACCOUNTNAME:
            return et.getIBZ5ACCOUNTName();
        case INDEX_UPDATEDATE:
            return et.getUpdateDate();
        case INDEX_UPDATEMAN:
            return et.getUpdateMan();
        default:
            throw new Exception("不明属性标识");
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#set(java.lang.String, java.lang.Object)
     */
    @Override
    public void set(String strParamName,Object objValue) throws Exception {
        if(this.getProxyEntity()!=null) {
            this.getProxyEntity().set(strParamName,objValue);
            return;
        }
        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");

        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null) {
            super.set(strParamName,objValue);
            return;
        }

        IBZ5ACCOUNT.set(this,index,objValue);
    }

    /**
     * 通过属性标识设定属性值
     * @param et 数据对象
     * @param index 属性标识
     * @param obj 值
     * @throws Exception
     */
    private static void set(IBZ5ACCOUNT et,int index,Object obj) throws Exception {
        switch(index) {
        case INDEX_BANKACCOUNTNUM:
            et.setBANKACCOUNTNUM(DataObject.getStringValue(obj));
            return ;
        case INDEX_BANKNAME:
            et.setBANKNAME(DataObject.getStringValue(obj));
            return ;
        case INDEX_CREATEDATE:
            et.setCreateDate(DataObject.getTimestampValue(obj));
            return ;
        case INDEX_CREATEMAN:
            et.setCreateMan(DataObject.getStringValue(obj));
            return ;
        case INDEX_IBZ5ACCOUNTID:
            et.setIBZ5ACCOUNTId(DataObject.getStringValue(obj));
            return ;
        case INDEX_IBZ5ACCOUNTNAME:
            et.setIBZ5ACCOUNTName(DataObject.getStringValue(obj));
            return ;
        case INDEX_UPDATEDATE:
            et.setUpdateDate(DataObject.getTimestampValue(obj));
            return ;
        case INDEX_UPDATEMAN:
            et.setUpdateMan(DataObject.getStringValue(obj));
            return ;
        default:
            throw new Exception("不明属性标识");
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#isNull(java.lang.String)
     */
    @Override
    public boolean isNull(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().isNull(strParamName);
        }
        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");

        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.isNull(strParamName);

        return  IBZ5ACCOUNT.isNull(this, index);
    }

    /**
     * 判断指定属性值是否为空值
     * @param et
     * @param index
     * @return
     * @throws Exception
     */
    private static boolean isNull(IBZ5ACCOUNT et,int index) throws Exception {

        switch(index) {
        case INDEX_BANKACCOUNTNUM:
            return et.getBANKACCOUNTNUM()==null;
        case INDEX_BANKNAME:
            return et.getBANKNAME()==null;
        case INDEX_CREATEDATE:
            return et.getCreateDate()==null;
        case INDEX_CREATEMAN:
            return et.getCreateMan()==null;
        case INDEX_IBZ5ACCOUNTID:
            return et.getIBZ5ACCOUNTId()==null;
        case INDEX_IBZ5ACCOUNTNAME:
            return et.getIBZ5ACCOUNTName()==null;
        case INDEX_UPDATEDATE:
            return et.getUpdateDate()==null;
        case INDEX_UPDATEMAN:
            return et.getUpdateMan()==null;
        default:
            throw new Exception("不明属性标识");
        }
    }


    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#contains(java.lang.String)
     */
    @Override
    public boolean contains(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().contains(strParamName);
        }

        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");
        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.contains(strParamName);

        return  IBZ5ACCOUNT.contains(this, index);
    }

    /**
     * 获取判断对象是否存在指定属性值
     * @param et
     * @param index
     * @return
     * @throws Exception
     */
    private static boolean contains(IBZ5ACCOUNT et,int index) throws Exception {

        switch(index) {
        case INDEX_BANKACCOUNTNUM:
            return et.isBANKACCOUNTNUMDirty();
        case INDEX_BANKNAME:
            return et.isBANKNAMEDirty();
        case INDEX_CREATEDATE:
            return et.isCreateDateDirty();
        case INDEX_CREATEMAN:
            return et.isCreateManDirty();
        case INDEX_IBZ5ACCOUNTID:
            return et.isIBZ5ACCOUNTIdDirty();
        case INDEX_IBZ5ACCOUNTNAME:
            return et.isIBZ5ACCOUNTNameDirty();
        case INDEX_UPDATEDATE:
            return et.isUpdateDateDirty();
        case INDEX_UPDATEMAN:
            return et.isUpdateManDirty();
        default:
            throw new Exception("不明属性标识");
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#onFillJSONObject(net.sf.json.JSONObject, boolean)
     */
    @Override
    protected void onFillJSONObject(JSONObject objJSON, boolean bIncludeEmpty) throws Exception {
        fillJSONObject(this,objJSON,bIncludeEmpty);
        super.onFillJSONObject(objJSON, bIncludeEmpty);
    }

    /**
     * 填充当前对象到JSON
     * @param et 当前数据对象
     * @param json JSON对象
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
    private static  void fillJSONObject(IBZ5ACCOUNT et,JSONObject json, boolean bIncEmpty) throws Exception {
        if(bIncEmpty||et.getBANKACCOUNTNUM()!=null) {
            JSONObjectHelper.put(json,"bankaccountnum",getJSONValue(et.getBANKACCOUNTNUM()),false);
        }
        if(bIncEmpty||et.getBANKNAME()!=null) {
            JSONObjectHelper.put(json,"bankname",getJSONValue(et.getBANKNAME()),false);
        }
        if(bIncEmpty||et.getCreateDate()!=null) {
            JSONObjectHelper.put(json,"createdate",getJSONValue(et.getCreateDate()),false);
        }
        if(bIncEmpty||et.getCreateMan()!=null) {
            JSONObjectHelper.put(json,"createman",getJSONValue(et.getCreateMan()),false);
        }
        if(bIncEmpty||et.getIBZ5ACCOUNTId()!=null) {
            JSONObjectHelper.put(json,"ibz5accountid",getJSONValue(et.getIBZ5ACCOUNTId()),false);
        }
        if(bIncEmpty||et.getIBZ5ACCOUNTName()!=null) {
            JSONObjectHelper.put(json,"ibz5accountname",getJSONValue(et.getIBZ5ACCOUNTName()),false);
        }
        if(bIncEmpty||et.getUpdateDate()!=null) {
            JSONObjectHelper.put(json,"updatedate",getJSONValue(et.getUpdateDate()),false);
        }
        if(bIncEmpty||et.getUpdateMan()!=null) {
            JSONObjectHelper.put(json,"updateman",getJSONValue(et.getUpdateMan()),false);
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#onFillXmlNode(net.ibizsys.paas.xml.XmlNode, boolean)
     */
    @Override
    protected void onFillXmlNode(XmlNode xmlNode,boolean bIncludeEmpty) throws Exception {
        fillXmlNode(this,xmlNode,bIncludeEmpty);
        super.onFillXmlNode(xmlNode, bIncludeEmpty);
    }

    /**
     * 填充当前对象到Xml节点中
     * @param et 当前数据对象
     * @param node Xml节点
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
    private static void fillXmlNode(IBZ5ACCOUNT et,XmlNode node,boolean bIncEmpty) throws Exception {
        if(bIncEmpty||et.getBANKACCOUNTNUM()!=null) {
            Object obj = et.getBANKACCOUNTNUM();
            node.setAttribute("BANKACCOUNTNUM",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getBANKNAME()!=null) {
            Object obj = et.getBANKNAME();
            node.setAttribute("BANKNAME",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getCreateDate()!=null) {
            Object obj = et.getCreateDate();
            node.setAttribute("CREATEDATE",(obj==null)?"":StringHelper.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS",obj));
        }
        if(bIncEmpty||et.getCreateMan()!=null) {
            Object obj = et.getCreateMan();
            node.setAttribute("CREATEMAN",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getIBZ5ACCOUNTId()!=null) {
            Object obj = et.getIBZ5ACCOUNTId();
            node.setAttribute("IBZ5ACCOUNTID",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getIBZ5ACCOUNTName()!=null) {
            Object obj = et.getIBZ5ACCOUNTName();
            node.setAttribute("IBZ5ACCOUNTNAME",(obj==null)?"":(String)obj);
        }
        if(bIncEmpty||et.getUpdateDate()!=null) {
            Object obj = et.getUpdateDate();
            node.setAttribute("UPDATEDATE",(obj==null)?"":StringHelper.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS",obj));
        }
        if(bIncEmpty||et.getUpdateMan()!=null) {
            Object obj = et.getUpdateMan();
            node.setAttribute("UPDATEMAN",(obj==null)?"":(String)obj);
        }


    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.entity.EntityBase#onCopyTo(net.ibizsys.paas.data.IDataObject, boolean)
     */
    @Override
    protected void onCopyTo(IDataObject dataEntity, boolean bIncludeEmtpy) throws Exception {
        IBZ5ACCOUNT.copyTo(this,dataEntity,bIncludeEmtpy);
        super.onCopyTo(dataEntity,bIncludeEmtpy);
    }

    /**
     * 复制当前对象数据到目标对象
     * @param et 当前数据对象
     * @param dst 目标数据对象
     * @param bIncEmpty 是否包括空值
     * @throws Exception
     */
    private static void copyTo(IBZ5ACCOUNT et,IDataObject dst,boolean bIncEmpty) throws Exception {
        if(et.isBANKACCOUNTNUMDirty() && (bIncEmpty||et.getBANKACCOUNTNUM()!=null)) {
            dst.set(FIELD_BANKACCOUNTNUM,et.getBANKACCOUNTNUM());
        }
        if(et.isBANKNAMEDirty() && (bIncEmpty||et.getBANKNAME()!=null)) {
            dst.set(FIELD_BANKNAME,et.getBANKNAME());
        }
        if(et.isCreateDateDirty() && (bIncEmpty||et.getCreateDate()!=null)) {
            dst.set(FIELD_CREATEDATE,et.getCreateDate());
        }
        if(et.isCreateManDirty() && (bIncEmpty||et.getCreateMan()!=null)) {
            dst.set(FIELD_CREATEMAN,et.getCreateMan());
        }
        if(et.isIBZ5ACCOUNTIdDirty() && (bIncEmpty||et.getIBZ5ACCOUNTId()!=null)) {
            dst.set(FIELD_IBZ5ACCOUNTID,et.getIBZ5ACCOUNTId());
        }
        if(et.isIBZ5ACCOUNTNameDirty() && (bIncEmpty||et.getIBZ5ACCOUNTName()!=null)) {
            dst.set(FIELD_IBZ5ACCOUNTNAME,et.getIBZ5ACCOUNTName());
        }
        if(et.isUpdateDateDirty() && (bIncEmpty||et.getUpdateDate()!=null)) {
            dst.set(FIELD_UPDATEDATE,et.getUpdateDate());
        }
        if(et.isUpdateManDirty() && (bIncEmpty||et.getUpdateMan()!=null)) {
            dst.set(FIELD_UPDATEMAN,et.getUpdateMan());
        }
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#remove(java.lang.String)
     */
    @Override
    public boolean remove(String strParamName) throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().remove(strParamName);
        }

        if(StringHelper.isNullOrEmpty(strParamName))
            throw new Exception("没有指定属性");
        Integer index=fieldIndexMap.get(strParamName.toUpperCase());
        if(index==null)
            return super.remove(strParamName);
        return  IBZ5ACCOUNT.remove(this, index);
    }

    /**
     * 通过属性标识删除属性值
     * @param entity
     * @param index
     * @return
     * @throws Exception
     */
    private static boolean remove(IBZ5ACCOUNT et,int index) throws Exception {
        switch(index) {
        case INDEX_BANKACCOUNTNUM:
            et.resetBANKACCOUNTNUM();
            return true;
        case INDEX_BANKNAME:
            et.resetBANKNAME();
            return true;
        case INDEX_CREATEDATE:
            et.resetCreateDate();
            return true;
        case INDEX_CREATEMAN:
            et.resetCreateMan();
            return true;
        case INDEX_IBZ5ACCOUNTID:
            et.resetIBZ5ACCOUNTId();
            return true;
        case INDEX_IBZ5ACCOUNTNAME:
            et.resetIBZ5ACCOUNTName();
            return true;
        case INDEX_UPDATEDATE:
            et.resetUpdateDate();
            return true;
        case INDEX_UPDATEMAN:
            et.resetUpdateMan();
            return true;
        default:
            throw new Exception("不明属性标识");
        }
    }


    private Object objIBZ5CUSTOMERLock = new Object();
    private com.sa.ibiz.demo.srv.demo.entity.IBZ5CUSTOMER ibz5customer = null;
    /**
    * 获取父数据 客户
     * @throws Exception
    */
    public com.sa.ibiz.demo.srv.demo.entity.IBZ5CUSTOMER getIBZ5CUSTOMER() throws Exception {
        if(this.getProxyEntity()!=null) {
            return this.getProxyEntity().getIBZ5CUSTOMER();
        }

        if(this.getIBZ5ACCOUNTId()==null)
            return null;
        synchronized(objIBZ5CUSTOMERLock) {
            if(ibz5customer==null) {
                ibz5customer = new com.sa.ibiz.demo.srv.demo.entity.IBZ5CUSTOMER();
                ibz5customer.setIBZ5CUSTOMERId(this.getIBZ5ACCOUNTId());
                com.sa.ibiz.demo.srv.demo.service.IBZ5CUSTOMERService service = (com.sa.ibiz.demo.srv.demo.service.IBZ5CUSTOMERService)ServiceGlobal.getService(com.sa.ibiz.demo.srv.demo.service.IBZ5CUSTOMERService.class,this.getSessionFactory());
                if(this.getIBZ5ACCOUNTId().indexOf(net.ibizsys.paas.service.ServiceBase.TEMPKEY) == 0)
                    service.getTemp(ibz5customer);
                else
                    service.get(ibz5customer);
            }
            return ibz5customer;
        }
    }





    /**
     *  获取代理的数据对象
     */
    private IBZ5ACCOUNT getProxyEntity() {
        return this.proxyIBZ5ACCOUNT;
    }

    /* (non-Javadoc)
     * @see net.ibizsys.paas.data.DataObject#onProxy(net.ibizsys.paas.data.IDataObject)
     */
    @Override
    protected void onProxy(IDataObject proxyDataObject) {
        this.proxyIBZ5ACCOUNT = null;
        if(proxyDataObject!=null && proxyDataObject instanceof IBZ5ACCOUNT) {
            this.proxyIBZ5ACCOUNT = (IBZ5ACCOUNT)proxyDataObject;
        }

    }

}